<html xmlns="http://www.w3.org/1999/xhtml"><head><style type="text/css">
dt {
  font-style: italic;
  margin-top: 15px;
  margin-bottom: 3px;
  margin-left: 0px;
  border-bottom: 1px dotted black;
}
dd {
  margin-left: 10px;
}
table {
  border-collapse:collapse;
  border: 1px solid black;
  margin-top: 7px;
}
th {
  border: 1px solid black;
  padding: 3 7 3 7;
}
td {
  border: 1px solid black;
  padding: 3 7 3 7;
}
</style></head><body><p><a name="d2l"></a><b>d2l</b> :
  convert double to long integer : <a href="opcodes.html">index</a> : <a href="http://asm.objectweb.org/asm40/javadoc/user/org/objectweb/asm/MethodVisitor.html#visitInsn(int)">visitInsn()</a></p><dl><dt>Description</dt><dd>Pops a two-word double precision floating point number off of the
operand stack, converts it into a 64-bit long integer, and pushes the resulting
two-word long onto the stack. <br></br>Rounding is done using IEEE 754 round-to-nearest mode. The fractional part is
lost by rounding towards zero, so (long)-3.14 becomes -3.<br></br>If the original double value is NaN, the result is 0. If the value is too large
to be represented as an integer, or if it is positive infinity, the result is
the largest possible long integer Long.MAX_VALUE. If the value is too small
(i.e. a negative value of large magnitude, or negative infinity) then the
result is the most negative long integer Long.MIN_VALUE. <br></br>In some implementations, this may be coded using the C casting mechanism, e.g.<br></br><pre>
void d2l(double d, int &amp;l_high, int &amp;l_low)
{
    l_low = (unsigned int)d;
	l_high = (unsigned int)(d / 2**32);
}
</pre>
where
l_low and l_high are respectively the least significant and most significant
32-bit words of the long.</dd><dt>See also</dt><dd><a href="ref-d2i.html">d2i</a> <a href="ref-.html"></a> <a href="ref-d2f.html">d2f</a> </dd><dt>Stack</dt><dd><table xmlns="">
<tr>
<td>
<b>Before </b>
</td>
<td><b>After</b></td></tr>
<tr>
<td>double-word1</td>
<td>long-word1</td></tr>
<tr>
<td>double-word2</td>
<td>long-word2</td></tr>
<tr>
<td>...</td>
<td>...</td></tr>
</table></dd><dt>Bytecode</dt><dd><table xmlns="">
<tr>
<td>
<b> Type </b>
</td>
<td><b>Description</b></td></tr>
<tr>
<td>
u1 
</td>
<td>d2l
opcode = 0x8F (143)
</td></tr>
</table></dd></dl></body></html>